package org.gaaidou.ptarmigan.springboot.functional.bean;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import org.gaaidou.ptarmigan.springboot.data.jpa.entity.BaseEntity;
import org.gaaidou.ptarmigan.springboot.data.jpa.entity.EnumType;
import org.hibernate.annotations.Type;

import java.util.List;

@Setter
@Getter
@Entity
@Table(name = "t_user")
public class User extends BaseEntity {

    private String name;

    private String password;

    private String mobile;

    @Type(value = EnumType.class)
    private Gender gender;

    @OneToMany(mappedBy = "user", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    private List<Experience> experiences;
}
